import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);

const routes = [
  {
    path:'/',
    redirect:'/login'
  },
  {
    path:'/login',
    component:() =>import ('../views/login.vue')
  },{
    path:'/register',
    component:() =>import ('../views/register.vue')
  },
  {
    path:'/chat',
    component:() =>import ('../components/chat/index.vue')
  },
  {
    path:'/friend',
    component:() =>import ('../components/friend/index.vue')
  },
]

const router = new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
